<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var a = prompt("请输入一个数");
        a = parseInt(a);
        var b = 0;
        if (a>90) {
            b = 4;
        }else if (a>80) {
            b = 3;
        }else if (a>70) {
            b = 2;
        }else if (a>60) {
            b = 1;
        }
        alert("b = "+b);
    </script>
</head>
<body>

</body>
</html>